package cn.stylefeng.guns.modular.task.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import cn.stylefeng.guns.modular.task.entity.TaskDetailed;
import cn.stylefeng.guns.modular.task.model.params.TaskDetailedParam;
import cn.stylefeng.guns.modular.task.model.result.TaskDetailedResult;

/**
 * 作业明细表 Mapper 接口
 */
public interface TaskDetailedMapper extends BaseMapper<TaskDetailed> {

    /**
     * 获取列表
     *
     * @author zhucx
     * @Date 2021-06-08
     */
    List<TaskDetailedResult> customList(@Param("paramCondition") TaskDetailedParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zhucx
     * @Date 2021-06-08
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") TaskDetailedParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2021-06-08
     */
    Page<TaskDetailedResult> customPageList(@Param("page") Page page, @Param("paramCondition") TaskDetailedParam paramCondition, @Param("condition") String condition);
    
    Page<TaskDetailedResult> findSumPageBySpec(@Param("page") Page page, @Param("paramCondition") TaskDetailedParam paramCondition, @Param("condition") String condition);
    
    Page<TaskDetailedResult> findworkerReportListPageBySpec(@Param("page") Page page, @Param("paramCondition") TaskDetailedParam paramCondition, @Param("condition") String condition
    		, @Param("operateId")Long operateId, @Param("outCustomerId")Long outCustomerId, @Param("taskWork")String taskWork, @Param("v8")String v8, @Param("carModel")String carModel, @Param("operateId2")Long operateId2);
    
    Page<TaskDetailedResult> findworkerReportListJxPageBySpec(@Param("page") Page page, @Param("paramCondition") TaskDetailedParam paramCondition, @Param("condition") String condition
    		,@Param("operateId")Long operateId,@Param("outCustomerId")Long outCustomerId,@Param("taskWork")String taskWork,@Param("v8")String v8,@Param("carModel")String carModel,@Param("operateId2")Long operateId2);
    
    /**
     * 获取分页实体列表
     *
     * @author zhucx
     * @Date 2021-06-08
     */
    Page<TaskDetailedResult> findPageBySpecApplets(@Param("page") Page page, @Param("paramCondition") TaskDetailedParam paramCondition, @Param("condition") String condition);

    /**
     * 获取分页map列表
     *
     * @author zhucx
     * @Date 2021-06-08
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") TaskDetailedParam paramCondition);

	TaskDetailedResult findBySpec(@Param("paramCondition")TaskDetailedParam param);

	List<TaskDetailedResult> findListBySpec(@Param("paramCondition")TaskDetailedParam param);

	List<TaskDetailedResult> findSumListBySpec(@Param("paramCondition")TaskDetailedParam param);

	List<cn.stylefeng.guns.modular.task.model.result.grRtaskSummaryList> grRtaskSummaryList(@Param("paramCondition") TaskDetailedParam paramCondition, @Param("condition") String condition
    		,@Param("operateId")Long operateId,@Param("outCustomerId")Long outCustomerId,@Param("taskWork")String taskWork,@Param("v8")String v8,@Param("carModel")String carModel,@Param("operateId2")Long operateId2);

	List<cn.stylefeng.guns.modular.task.model.result.grRtaskSummaryList> grRtaskSumList(@Param("paramCondition") TaskDetailedParam paramCondition, @Param("condition") String condition
    		,@Param("operateId")Long operateId,@Param("outCustomerId")Long outCustomerId,@Param("taskWork")String taskWork,@Param("v8")String v8,@Param("carModel")String carModel,@Param("operateId2")Long operateId2);

	List<TaskDetailedResult> findSumtaskRankingBySpec(@Param("paramCondition")TaskDetailedParam param);
	List<TaskDetailedResult> findSumtaskRankingBySpec2(@Param("paramCondition")TaskDetailedParam param);

	TaskDetailedResult checkmetaskRanking(@Param("paramCondition")TaskDetailedParam param);

	TaskDetailedResult findBySpecZuoYeZhong(@Param("paramCondition")TaskDetailedParam param);

	List<TaskDetailedResult> sumGongrenMonth(@Param("paramCondition")TaskDetailedParam param);

	TaskDetailedResult sumPeoples(@Param("paramCondition")TaskDetailedParam param, @Param("operateId")Integer operateId);

	List<TaskDetailedResult> findlimit9task(@Param("paramCondition")TaskDetailedParam taskDetailedParam);

}
